
let walking = null;

// 返回步行规划
export function walkPlanResult(params) {
  if(!walking) {
    walking = new AMap.Walking({
      map: params.map,
      hideMarkers: true
    })
  }
  walking.search(params.position_start, params.position_end, (status, result) => {
    if (status === 'complete') {
      params.onComplete && params.onComplete(result);
    } else {
      console.log('步行路线数据查询失败' + result)
    } 
  })
} 